home *** CD-ROM | disk | FTP | other *** search
/ Internet.Works 40 / Issue 40.iso / pc / PCSoftware / HTML Tool 3.5 / htmltool.exe / _SETUP.1 / Stars.scp < prev    next >
Encoding:
Text File  |  2000-03-06  |  2.5 KB  |  76 lines

  1. <HTMLtool>Starfield layer</HTMLtool>
  2.  
  3. <!-- TWO STEPS TO INSTALL STARS:
  4.  
  5.    1.  Paste the first code in the HEAD of your HTML document
  6.    2.  Add the last code in the BODY of your HTML document  -->
  7.  
  8. <!-- STEP ONE: Paste the first code in the HEAD of your HTML document  -->
  9.  
  10. <HEAD>
  11.  
  12. <!-- Original:  freeware.de -->
  13. <!-- Web Site:  http://freeware.de -->
  14.  
  15. <style type="text/css">
  16. <!-- Begin CSS
  17. #a { position: absolute; top: 10px; left: 10px; visibility: visible }
  18. #b { position: absolute; top: 10px; left: 10px; visibility: visible }
  19. #c { position: absolute; top: 10px; left: 10px; visibility: visible }
  20. #d { position: absolute; top: 10px; left: 10px; visibility: visible }
  21. #e { position: absolute; top: 10px; left: 10px; visibility: visible }
  22. #f { position: absolute; top: 10px; left: 10px; visibility: visible }
  23. #g { position: absolute; top: 10px; left: 10px; visibility: visible }
  24. End CSS -->
  25. </style>
  26.  
  27. </HEAD>
  28.  
  29. <!-- STEP TWO: Add the last code in the BODY of your HTML document  -->
  30.  
  31. <BODY>
  32.  
  33. <LAYER NAME="a" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000" CLIP="0,0,2,2"></LAYER>
  34. <LAYER NAME="b" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF8000" CLIP="0,0,2,2"></LAYER>
  35. <LAYER NAME="c" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,2,2"></LAYER>
  36. <LAYER NAME="d" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00FF00" CLIP="0,0,2,2"></LAYER>
  37. <LAYER NAME="e" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#0000FF" CLIP="0,0,2,2"></LAYER>
  38. <LAYER NAME="f" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF00FF" CLIP="0,0,2,2"></LAYER>
  39. <LAYER NAME="g" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFFFF" CLIP="0,0,2,2"></LAYER>
  40.  
  41. <script language="JavaScript1.2">
  42. <!-- Begin 
  43. var ns=document.layers ? 1 : 0;
  44. if (ns) {
  45. window.captureEvents(Event.MOUSEMOVE);
  46. var yBase = 200;
  47. var xBase = 200;
  48. var delay = 10;
  49. var yAmpl = 10;
  50. var yMax = 40;
  51. var step = .2;
  52. var ystep = .5;
  53. var currStep = 0;
  54. var tAmpl=1;
  55. var Xpos = 50;
  56. var Ypos = 50;
  57. var j = 0;
  58. function MoveHandler(evnt) {
  59. Xpos = evnt.pageX;
  60. Ypos = evnt.pageY;
  61. }
  62. window.onMouseMove = MoveHandler;
  63. function animateLogo() {
  64. yBase = window.innerHeight/4 ;
  65. xBase = window.innerWidth/4;
  66. for ( j = 0 ; j < 7 ; j++ ) {
  67. document.layers[j].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
  68. document.layers[j].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
  69. }
  70. currStep += step;
  71. setTimeout("animateLogo()", delay);
  72. }
  73. animateLogo();
  74. }
  75. // End -->
  76. </script>